﻿ 

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PACKETPARSERMAX20.CORE;

namespace PACKETPARSERMAX20.CORE.DEFINITIONS
{
    public class SMSG_RAID_INSTANCE_INFO_DEF : DefinitionBase
    {
        
        public override bool Process()
        {
            ResetPosition();
            var count = ReadUInt32("count");

            for (int i = 0; i < count; i++)
            {
                var mapid = ReadUInt32("mapid_"+i.ToString());//data << uint32(state->GetMapId());          // map id
                var difficulty = ReadUInt32("difficulty_" + i.ToString()); //data << uint32(state->GetDifficulty());     // difficulty
                var InstanceGuid = ReadUInt64("InstanceGuid_" + i.ToString());//data << ObjectGuid(state->GetInstanceGuid());// instance guid
                var expired = ReadByte("expired_" + i.ToString());//data << uint8(1);                           // expired = 0
                var extended = ReadByte("extended_" + i.ToString()); //data << uint8(0);                           // extended = 1
                var resettime = ReadUInt32("resettime_" + i.ToString()); //data << uint32(state->GetResetTime() - now);// reset time
                this.Result += "\n";
            }
            return Validate();
        }
    }
}

